/**
 * 登录的 API 接口: /api/login
 */
export default defineEventHandler(async (event) => {
  const query = getQuery(event);
  const method = getMethod(event);
  const body = await readBody(event);
  const bodyRaw = await readRawBody(event);

  console.log(query, method, body, bodyRaw);

  return {
    code: 200,
    data: {
      name: "张三",
      token: "1234567890",
      age: 18,
    },
  };
});
